At first I thought there was an issue with duplicate field names, etc. However, this didn't really make sense as their definitions are "private". After deleting fields, etc and getting no where, I ended determining the the issue is related to the sql query string. When I go to configure the datasource using the wizard, I enter the query string and when I attempt to click "Execute Query" this error display. In this query I am selecting similar column names from the database. I renamed the datasource name property and still no luck. Why would my query cause this? I have listed them below. BTW... both queries execute fine in SQL Server Management Studio.
See attachment.
sqlDataSource1
SELECT Groups.*, Softrip.dbo.Suppliers.SupplierName
FROM Groups LEFT OUTER JOIN Softrip.dbo.Suppliers ON
Groups.SupplierID = Softrip.dbo.Suppliers.SupplierID
sqlDataSource4
SELECT StatusChange.*, Groups.*, Softrip.dbo.Suppliers.SupplierName
FROM StatusChange LEFT OUTER JOIN Groups ON
StatusChange.GroupID = Groups.GroupID LEFT OUTER JOIN Softrip.dbo.Suppliers ON
Groups.SupplierID = Softrip.dbo.Suppliers.SupplierID
14 Answers, 1 is accepted
You've pretty much narrowed it down. The exception can occur if you are selecting columns with the same names from the database. Use SQL Server Management Studio to see the names of all columns and rename the ones with matching names as necessary. It might be necessary to delete the SqlDataSource component from the report, save it and reopen the project in Visual Studio in order for the changes to take effect.
All the best,
Steve
the Telerik team
Please install the latest internal build (available in your account) where we made a fix that might be related to this problem. If the issue persists after this, please provide your sql query here, so we can pinpoint the problem.
Regards,
Steve
the Telerik team
There was duplicate fields in the query. I removed that and at least the sqldatasource didn't return any errors when I created it and added to the report. but, after creating a sqldatasource that works and I can test it by executing the query when running the wizard. Now, when I add a textbox to the report, and I click on the value elipsis, and then fields, I see a grey icon with 'No Data Source' beside it. Interesting how a datasource is added to the report, and you can't even use it?
What exactly did I miss?
Did you add the SqlDataSource Component as DataSource for the Data Item you're using? When you drag & drop a Data Source Components to the report, you need to assign it as DataSource to a data item in order to have access to the fields.
All the best,
Steve
the Telerik team
I meant the Data Item in my previous post and if you look at the link you would notice the Report itself is a data item. If you start the Data Source Wizard from the DataSource property of the data item itself or from the Report/Table wizards, then yes, it would be automatically set as DataSource. However, when you drag & drop a Data Source Component to the report, you need to assign it as DataSource to a data item in order to have access to the fields.
Greetings,
Steve
the Telerik team
Thank you.
Should I assume that you are using the Web Report Viewer? If that is the case, the true print functionality depends on the Acrobat PDF plug-in i.e. you should have Acrobat (Reader or Pro version) installed and its PDF plug-in enabled in the browser. If that is not so, the print button would still work but the print would degrade to the browser built-in print. In other words it would print only the visible part of the report in the viewer.
Kind regards,
Steve
the Telerik team
If the viewer does not detect the plug-in, it would open the default browser print dialog. If that is not happening, then there might be various reasons that disallow the print dialog to be opened from your browser e.g.:
- Disable Print menu in IE group policy
- disabled javascript
- disabled pdf plugin for that browser
- make sure that there are no other plug-ins with the same functionality, e.g. Foxit. Sometimes it may happen that they tamper with each other.
All the best,
Steve
the Telerik team
it's definitely not what you mentioned there. Shouldn't it come up with a standard print dialog box when you click the print button from the report viewer? Nothing happens. It just communicates with the server when you press the print button, and then nothing. So, there's got to be some setting in the report viewer to turn on printing, or some setting that I missed. Is it a bug? I just open a browser window popup with the report viewer in it. Everything works on that report viewer except for printing. And, I tried firefox, and IE7. Pdf plugins are installed, javascript is enabled, Print Menu is enabled, as I can print any webpage from the browser print menu. It's got to be the report viewer settings or something like that.
Thank you.
We've not encountered a case where the print button does not do anything at all, but everything else functions correctly. You can use Fiddler to see what is the request sent from the browser and what is the response from the server, use the Instectors for this purpose. That should give you a clue what is happening.
Regards,
Steve
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Hi Steve. I'll try that, but not sure what I would find. I guess I would see just the wrong information sent to the server. But, in Firebug, I see the generated code here:
<
div
title
=
"Print"
id
=
"MainPanel_rpvInvoiceSummary_ReportToolbar_PrintGr_Print"
>
<
table
cellspacing
=
"0"
cellpadding
=
"0"
style
=
"border-collapse: collapse;"
class
=
"NormalButton"
id
=
"MainPanel_rpvInvoiceSummary_ReportToolbar_PrintGr_Print_Button"
>
<
tbody
><
tr
>
<
td
class
=
"ImageButtonCell"
unselectable
=
"on"
><
input
type
=
"image"
onclick
=
"return false;"
src
=
"/CFM-SPP/Telerik.ReportViewer.axd?optype=Resource&version=5.0.11.316&name=Skins.Default.Print.gif"
class
=
"Enabled"
title
=
"Print"
name
=
"ctl00$MainPanel$rpvInvoiceSummary$ReportToolbar$PrintGr$Print$ctl00"
><
input
type
=
"image"
onclick
=
"return false;"
src
=
"/CFM-SPP/Telerik.ReportViewer.axd?optype=Resource&version=5.0.11.316&name=Skins.Default.PrintDisabled.gif"
class
=
"Disabled"
title
=
"Print"
name
=
"ctl00$MainPanel$rpvInvoiceSummary$ReportToolbar$PrintGr$Print$ctl01"
></
td
>
</
tr
>
</
tbody
></
table
>
</
div
>
Does this look correct?