(objectDataSource While Getting data From WCF)
Hi All,,
From your demos I fall in love with your products *_*,, So thank you a lot ....
I'm kind off new to Telerik Reporting Tool..
I have a WPF Application Built In MVVM (Model-View-View Model) and it Gets the data inside the Model from a WCF..
It works as a charm..
Now I want to replace the reporting feature in the application with the one your product is providing...
so I've started by creating a ReportsLibrary Project..
Then I've Created the DataSource as an objectDatatSource (So It Reads the data from the following method in the Model Class)
public
static
List<ALERT> Load()
{
List<ALERT> myList =
new
List<ALERT>();
AlertServices.AlertServiceClient AlertClient =
new
AlertServices.AlertServiceClient();
AlertClient.ClientCredentials.UserName.UserName =
"usrName"
;
AlertClient.ClientCredentials.UserName.Password =
"password"
;
ALERT[] dtAlerts = AlertClient.getAllAlerts();
foreach
(ALERT alrt
in
dtAlerts )
{
myList.Add(alrt);
}
AlertClient.Close();
return
myList;
}
Everything went smoothly with the report design which I have called AllAlerts..
when i tried to review the report before adding it to the WPF application I have got this Error Message...
(An Image Is Attached)
An error has occurred while processing Report 'AllAlerts':
Exception has been thrown by the target of an invocation.
------------- InnerException -------------
Could not find default endpoint element that references contract 'AlertServices.IAlertService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
Telerik Reporting v5.0 trial version. Copyright Telerik © 2002-2011.
To remove this message, please obtain a commercial version from www.telerik.com
Noting That I have Added The Project In The Same Solution That All It is Projects Are working soo fine..
And The Following (app.config) Configuration File is located in the ReportsLibrary Project..
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
system.serviceModel
>
<
bindings
>
<
wsHttpBinding
>
<
binding
name
=
"wsHttpAlrEndpoint"
closeTimeout
=
"00:01:00"
openTimeout
=
"00:01:00"
receiveTimeout
=
"00:10:00"
sendTimeout
=
"00:01:00"
bypassProxyOnLocal
=
"false"
transactionFlow
=
"false"
hostNameComparisonMode
=
"StrongWildcard"
maxBufferPoolSize
=
"524288"
maxReceivedMessageSize
=
"1024000"
messageEncoding
=
"Text"
textEncoding
=
"utf-8"
useDefaultWebProxy
=
"true"
allowCookies
=
"false"
>
<
readerQuotas
maxDepth
=
"32"
maxStringContentLength
=
"8192"
maxArrayLength
=
"16384"
maxBytesPerRead
=
"4096"
maxNameTableCharCount
=
"16384"
/>
<
reliableSession
ordered
=
"true"
inactivityTimeout
=
"00:10:00"
enabled
=
"false"
/>
<
security
mode
=
"Message"
>
<
transport
clientCredentialType
=
"Windows"
proxyCredentialType
=
"None"
realm
=
""
/>
<
message
clientCredentialType
=
"UserName"
negotiateServiceCredential
=
"true"
algorithmSuite
=
"Default"
/>
</
security
>
</
binding
>
</
wsHttpBinding
>
</
bindings
>
<
client
>
<
endpoint
address
=
"http://muaath.local/TRDWCFSurv/TRDWCFSurvServices.AlertService.svc"
binding
=
"wsHttpBinding"
bindingConfiguration
=
"wsHttpAlrEndpoint"
contract
=
"AlertServices.IAlertService"
name
=
"wsHttpAlrEndpoint"
>
<
identity
>
<
certificate
encodedValue
=
"AwAAAAEAAAAUAAAAxtusZ48yxeG84lIeb9af1Wg7ib8gAAAAAQAAAMwBAAAwggHIMIIBNaADAgECAhDGybGTRx4Fg0xdc1+CAK0SMAkGBSsOAwIdBQAwETEPMA0GA1UEAxMGSWRDZXJ0MCAXDTEwMDMyNDEyMDI1MloYDzQwMDgxMTI0MTIwMjUyWjARMQ8wDQYDVQQDEwZJZENlcnQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKl6oADCxSKQ+isZMfBzjafbEDPmE9Hn6yStKCoXjGlskH5Yqmwp7q4hrLbPmJT7iE4NEtmtJ9MCmXxJuGJuT8mgVadzAHNFnlHCG0DhdZJrg4tSe+vOo0yYVq96zMH6I8QCLyALBS15bdWcG0QpOa5mm6ZeO9hp23cYwJhgeHiPAgMBAAGjJzAlMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA4GA1UdDwQHAwUAsAAAADAJBgUrDgMCHQUAA4GBAEGNLlMfqLpAx8fg35D/NVZIbE2psK2M7BgiTOd/KFgYTbiWT/I7zfPlcQ1DFQ59NtuVbODVsTCZQdmmNr6iZIEnEBsdfsdfjsdfjklsdf78sdjfkjsdklf8Y4XXNQMpIcjcTK+dpM6KcnK4ocmLhXzLbgKcR5YUWmsdxSdt"
/>
</
identity
>
</
endpoint
>
</
client
>
</
system.serviceModel
>
</
configuration
>
By The Way I've Tried To View The Rreport from The WPF ReportViewer but I've Got Errors Adding The Viewer Control To The WPF View.. (So Lets Find a Solution for the First Problem First Then I Will Give You More Details About The Second One) *_*
My Best Regards..