Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Sir, Is there no report viewer with visual studio.net 2022...? How should I create and view a report...?

What I have tried:

I don't know.... I checked the menus but coul/d not find the report editor. Instead I have used PrintPreviewControl that is available in toolbox. iewcontrol
I then have coded as :-
C#
{
printviewcontrol p=new printviewcontrol();
Bitmap b=new Bitmap(bitmap.FromFile("e:/gf.bmp"));
rectangle r=new rectangle(0,0,b.width,b.height);
p.bounds=r;
p.document=b;
p.show();
}

On writing code like this I got error saying:-
cannot implicitly convert System.Drawing.BitMap to System.Printing.PrintDocument.
Now What to do...?
Posted
Updated 5-Apr-22 8:13am
v2

1 solution

As of February 26th 2022 VS 2022 does not support a Report Viewer. There is advice to be found on this link https://docs.microsoft.com/en-us/answers/questions/751853/how-to-solve-report-related-problem-in-visual-stud.html[^] which was literally the first (non advert) result from a google search with the words "report viewer for visual studio 2022"
 
Share this answer
 
Comments
Maciej Los 5-Apr-22 14:41pm    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900